package com.xiaobaibai.common;

public enum  PayEnum {

    SUCCESS("SUCCESS","支付成功"),
    REFUND("REFUND","转入退款"),
    NOTPAY("NOTPAY","未支付"),
    CLOSED("CLOSED","已关闭"),
    REVOKED("REVOKED","已撤销"),
    USERPAYING("USERPAYING","用户支付中"),
    PAYERROR("PAYERROR","支付失败"),
    ;

    private String status;

    private String msg;

    PayEnum(String status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public static PayEnum getPayEnum(String status){
        for (PayEnum value : PayEnum.values()) {
            if (value.status.equals(status))
                return value;
        }
        return null;
    }
}
